<script type="text/javascript">
	$(function() {
	    $.fn.dataGridOptions.formSubFun("#form",'/modules/additional/experienceRule/doAppend.html',"添加成功！","添加失败！");
	});
</script> 
<form id="form" method="post" autocomplete="off">
<div class="popForm sForm">
	<div class="formitm">
		<label class="lab">名称：</label>
		<div class="ipt"><input type="text" name="name" style="width:120px;" class="name easyui-validatebox" data-options="required: true,validType:'maxLength[15]'"></div>
	</div>
	<div class="formitm">
		<label class="lab">金额：</label>
		<div class="ipt"><input type="text" name="amount" style="width:60px;" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" class="amount easyui-validatebox int_figure_required" data-options="required: true, validType:['numOnly','accout[1,10000]']" maxlength="5">元</div>
	</div>
	<div class="formitm">
		<label class="lab">有效期：</label>
		<div class="ipt"><input type="text" name="validTime" style="width:60px;" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" class="validTime easyui-validatebox int_figure_required" data-options="required: true, validType:['numOnly','day[1, 365]']" maxlength="3">天</div>
	</div>
	<div class="formitm">
		<label class="lab">名额：</label>
		<div class="ipt"><input type="text" name="quota" style="width:60px;" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" class="quota easyui-validatebox int_figure_required" data-options="required: true, validType:['numOnly','copies[1, 100000]']" maxlength="6">份</div>
	</div>
	<div class="formitm">
		<label class="lab">状态：</label>
		<div class="ipt">
			<select name="status" id="status">
				<option value="0" selected="selected">未启用</option>
				<option value="1">启用</option>
			</select>
		</div>
	</div>
</div>
</form>
<script>
	//输入框要求必须为整数数字
	$('.int_figure_required').bind('keyup blur', function() {
	    // 不能输入 类似00、01、0000001的数值
		  	if($(this).val().match(/^0+\d+/)){
	        this.value = $(this).val().replace(/^0+(\d+)/, '$1');
	    }
		  	
	});
</script>